"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const request = require("request");
const index$1 = require("../../../const/index.js");
const index = require("../../api/index.js");
async function _codeParse(code) {
  return await request.postRequest(index.API_Ali_Auth)({
    client_id: index$1.AliApplication.appId,
    client_secret: index$1.AliApplication.secret,
    grant_type: "authorization_code",
    code
  });
}
async function _getUserInfo(token) {
  return await request.getRequest(index.API_Ali_User_Info)(
    {},
    {
      contentType: "json",
      headers: {
        Authorization: token
      }
    }
  );
}
exports._codeParse = _codeParse;
exports._getUserInfo = _getUserInfo;
